package top.lfyao.designpattern.details.factory.method;

import top.lfyao.designpattern.details.factory.simple.*;

public interface IFactory {
    Operation createOperation();
}

class AddFactory implements IFactory {

    @Override
    public Operation createOperation() {
        return new OperationAdd();
    }
}

class SubtractionFactory implements IFactory {

    @Override
    public Operation createOperation() {
        return new OperationSubtraction();
    }
}

class MultiplicationFactory implements IFactory {

    @Override
    public Operation createOperation() {
        return new OperationMultiplication();
    }
}

class DivisionFactory implements IFactory {

    @Override
    public Operation createOperation() {
        return new OperationDivision();
    }
}